laravel limit foreach

56

Foreach limit laravel -

@foreach ($users->slice(0, 5) as $user)

  {{$user->option1}} <br>

@endforeach 

laravel limit foreach -

@foreach ($element['subs']->slice(0, 10) as $item)
 ...Code
@endforeach

Comments

Submit
0 Comments